package com.jbit.userserver.controller;

import com.jbit.common.ResponseEntity;
import com.jbit.common.ResponseUtils;
import com.jbit.userserver.model.dto.FunctionDTO;
import com.jbit.userserver.model.entity.User;
import com.jbit.userserver.model.vo.UserVO;
import com.jbit.userserver.service.FunctionService;
import org.apache.tomcat.util.http.ResponseUtil;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/function")
public class FunctionController {
    @Resource
    private FunctionService functionService;
    @PostMapping("/findMenuByPNumber")
    public List<FunctionDTO> findMenuByPNumber(@RequestBody UserVO userVO){
        return functionService.getFunctionByUserId(userVO.getUserId());
    }

}
